package com.xiangjun.feign.feignclient;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "hello-feign",url = "https://api.github.com")
public interface HelloFeignTest {

    //@GetMapping(value = "/search/repositories")
    //public String test(@RequestParam("q") String q);

    //开启数据压缩后，返参格式统一为以下才可以
    @GetMapping(value = "/search/repositories")
    ResponseEntity<byte[]> test(@RequestParam("q") String q);
}